package body Ada_Lexer is

  type Analyzer_Record is record
    Analyzer   : Tokenizer.Instance;
    Initialized: Boolean := False;
  end record;

  Analyzer: Analyzer_Record;

  procedure Init_Analyzer is
  begin
    Analyzer.Analyzer    := Tokenizer.Initialize (Syntax);
    Analyzer.Initialized := True;
  end Init_Analyzer;

  function Get_Analyzer return Tokenizer.Instance is
  begin
    if (not Analyzer.Initialized) then
      raise Not_Initialized_Exception;
    end if;
    return Analyzer.Analyzer;
  end Get_Analyzer;

end Ada_Lexer;
